package com.magina.project.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import java.util.Date;


@Getter
@Setter
@MappedSuperclass
public abstract class BaseEntity extends AbstractIdEntity {

    /**
     * 操作标志(A-增加，U-更新，D-删除)
     */
    @Column(name ="operation_flag" )
    private String operationFlag;

    /**
     * 创建人ID
     */
    @Column(name ="creator_id" )
    private String creatorId;

    /**
     * 创建人
     */
    @Column(name ="creator" )
    private String creator;

    /**
     * 创建时间
     */
    @Column(name ="CREATED" )
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    private Date created;

    /**
     * 修改人ID
     */
    @Column(name ="modifier_id"  )
    private String modifierId;

    /**
     * 修改人
     */
    @Column(name ="modifier"  )
    private String modifier;

    /**
     * 修改时间
     */
    @Column(name ="modified"  )
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    private Date modified;

    /**
     * 0未删除1已删除
     */
    @Column(name ="modified"  )
    private boolean deleted;


}
